<!-- 发布 -->
<template>
  <div class="box">
    <div class="box-header">
      <div @click="fanhui">《返回</div>
      <div>发布动态</div>
      <div></div>
    </div>
    <div class="box-bbody">
      <div class="B-box1">
        <div class="B-b-box1">动态文档</div>
        <div class="B-b-box2">
          <!-- style="height: 200px; width: 900px; word-break: break-all" -->
          <textarea></textarea>
        </div>
      </div>
      <div class="B-box1">
        <div class="B-b-box1">动态图片</div>
        <div class="B-b-box2">
          <!-- style="height: 200px; width: 900px; word-break: break-all" -->
          <van-field name="uploader">
            <template #input>
              <van-uploader v-model="uploader" />
            </template>
          </van-field>
        </div>
      </div>
    </div>
    <div class="box-footer">
      <button>发布</button>
    </div>
  </div>
</template>

<script>
export default {
  //import引入的组件需要注入到对象中才能使用
  components: {},
  data() {
    //这里存放数据
    return {
      uploader: [
        {
          url: "https://image21.5i5j.com/cbsv/2021/08/23/cdcfb9a1161341ac9652e2620f38ea23.jpg_P5.jpg",
        },
      ],
    };
  },
  //监听属性 类似于data概念
  computed: {},
  //监控data中的数据变化
  watch: {},
  //方法集合
  methods: {
    fanhui() {
      this.$router.push("/Loushi");
    },
  },
  //生命周期 - 创建完成（可以访问当前this实例）
  created() {},
  //生命周期 - 挂载完成（可以访问DOM元素）
  mounted() {},
};
</script>
<style lang='scss' scoped>
.box {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: paleturquoise;
}
.box-header {
  width: 100%;
  height: 50px;
  color: #fff;
  background: blue;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0px 10px;
}
.box-bbody {
  width: 100%;
  flex: 1;
  overflow-x: hidden;
  background: #fff;
  padding: 0px 20px;
}
.B-box1 {
  width: 100%;
  height: 150px;
  line-height: 50px;
  display: flex;
  flex-direction: column;
}
.B-b-box1 {
  width: 100%;
  height: 50px;
  color: #ccc;
}
.B-b-box2 {
  width: 100%;
  height: 100px;
}
.B-b-box2 textarea {
  width: 100%;
  height: 100px;
}
// .B-box2 {
//   width: 100%;
//   height: 100px;
//   background: palegreen;
// }

////////////////////
.box-footer {
  width: 100%;
  height: 50px;
}
.box-footer button {
  width: 100%;
  height: 100%;
  text-align: center;
  line-height: 50px;
  color: #fff;
  font-weight: bolder;
  outline: none;
  border: none;
  background: rgb(0, 153, 255);
}
.box-footer button:hover {
  background: rgb(7, 129, 211);
}
</style>